home *** CD-ROM | disk | FTP | other *** search
/ Mac Easy 2010 May / Mac Life Ubuntu.iso / casper / filesystem.squashfs / var / lib / python-support / python2.6 / glchess / defaults.pyc (.txt) < prev    next >
Encoding:
Python Compiled Bytecode  |  2009-04-20  |  3.3 KB  |  76 lines

  1. # Source Generated with Decompyle++
  2. # File: in.pyc (Python 2.6)
  3.  
  4. import os
  5. import os.path as os
  6. import errno
  7. import gettext
  8. root_dir = os.path.dirname(__file__)
  9. if not os.path.exists(os.path.join(root_dir, 'Makefile.am')):
  10.     APP_DATA_DIR = os.path.join('/usr', 'share')
  11.     ICON_DIR = os.path.join(APP_DATA_DIR, 'pixmaps')
  12.     TEXTURE_DIR = os.path.join(ICON_DIR, 'glchess')
  13.     GLADE_DIR = os.path.join(APP_DATA_DIR, 'glchess')
  14.     BASE_DIR = os.path.join(APP_DATA_DIR, 'glchess')
  15.     LOCALEDIR = os.path.join(APP_DATA_DIR, 'locale')
  16.     DATA_DIR = os.path.expanduser('~/.gnome2/glchess/')
  17.     LOG_DIR = os.path.join(DATA_DIR, 'logs')
  18.     CONFIG_FILE = os.path.join(DATA_DIR, 'config.xml')
  19.     HISTORY_DIR = os.path.join(DATA_DIR, 'history')
  20.     UNFINISHED_FILE = os.path.join(HISTORY_DIR, 'unfinished')
  21.     LOCAL_AI_CONFIG = os.path.join(DATA_DIR, 'ai.xml')
  22.     GGZ_DIR = os.path.expanduser('~/.ggz')
  23.     GGZ_CONFIG_FILE = os.path.join(GGZ_DIR, 'ggz-gtk.rc')
  24. else:
  25.     APP_DATA_DIR = os.path.join(root_dir, '../../data')
  26.     ICON_DIR = os.path.join(root_dir, '../../textures')
  27.     TEXTURE_DIR = os.path.join(root_dir, '../../textures')
  28.     GLADE_DIR = os.path.join(root_dir, '../../glade')
  29.     BASE_DIR = os.path.join(root_dir, '../../data')
  30.     LOCALEDIR = os.path.join(APP_DATA_DIR, 'locale')
  31.     DATA_DIR = os.path.expanduser('~/.gnome2/glchess/')
  32.     LOG_DIR = os.path.join(DATA_DIR, 'logs')
  33.     CONFIG_FILE = os.path.join(DATA_DIR, 'config.xml')
  34.     HISTORY_DIR = os.path.join(DATA_DIR, 'history')
  35.     UNFINISHED_FILE = os.path.join(HISTORY_DIR, 'unfinished')
  36.     LOCAL_AI_CONFIG = os.path.join(DATA_DIR, 'ai.xml')
  37.     GGZ_DIR = os.path.expanduser('~/.ggz')
  38.     GGZ_CONFIG_FILE = os.path.join(GGZ_DIR, 'ggz-gtk.rc')
  39. DOMAIN = 'gnome-games'
  40. gettext.bindtextdomain(DOMAIN, LOCALEDIR)
  41. gettext.textdomain(DOMAIN)
  42. from gettext import gettext as _
  43. import gtk.glade as gtk
  44. gtk.glade.bindtextdomain(DOMAIN, LOCALEDIR)
  45. gtk.glade.textdomain(DOMAIN)
  46. VERSION = '2.26.1'
  47. APPNAME = _('glChess')
  48. ICON_NAME = 'gnome-glchess'
  49. COPYRIGHT = _('Copyright 2005-2008 Robert Ancell (and contributors)')
  50. DESCRIPTION = _('The 2D/3D chess game for GNOME. \n\nglChess is a part of GNOME Games.')
  51. WEBSITE = 'http://www.gnome.org/projects/gnome-games/'
  52. WEBSITE_LABEL = _('GNOME Games web site')
  53. AUTHORS = [
  54.     'Robert Ancell <bob27@users.sourceforge.net>\nAndreas R\xc3\xb8sdal <andreasr@gnome.org>']
  55. ARTISTS = [
  56.     'John-Paul Gignac (3D Models)',
  57.     'Max Froumentin (2D Models)',
  58.     'Hylke Bons <h.bons@student.rug.nl> (icon)']
  59. LICENSE = [
  60.     _('%s is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.').replace('%s', APPNAME),
  61.     _('%s is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more details.').replace('%s', APPNAME),
  62.     _('You should have received a copy of the GNU General Public License along with %s; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA').replace('%s', APPNAME)]
  63.  
  64. try:
  65.     os.makedirs(DATA_DIR)
  66. except OSError:
  67.     e = None
  68.     if e.errno != errno.EEXIST:
  69.         print _('Unable to make data directory %(dir)s: %(error)s') % {
  70.             'dir': DATA_DIR,
  71.             'error': e.strerror }
  72.     
  73. except:
  74.     e.errno != errno.EEXIST
  75.  
  76.